#!/bin/bash
################ makefile ######################
KEYSTORE=~/.keystore

echo "- set up CLASSPATH..."
export CLASSPATH=$CLASSPATH:`pwd`/bin
echo "- clean up..."
rm ./bin/*.class > /dev/null
echo "- compile..."
cd ./src
javac -d ../bin *.java \
&& echo "- compile plugins..." \
&& cd ./plugins \
&& javac -d ../../bin/jar/plugins *.java \
&& cd ../.. \
&&  ./jar_me.sh \
&& echo "- start jar..." \
&& java  -Djavax.net.ssl.keyStore=$KEYSTORE -Djavax.net.ssl.keyStorePassword=jtalker -jar ./bin/jar/jtalkerserver.jar --ssl -p 4445 -x ./bin/jar/plugins  -w ./ \
&& echo "All OK."
echo "ready." 
